home *** CD-ROM | disk | FTP | other *** search
/ By Popular Request 2.0 / By Popular Request 2.0 (Arsenal Computer).ISO / amiga_5 / peekqual.ads < prev    next >
Text File  |  1995-06-27  |  3KB  |  78 lines

  1.  Amiga Distribution System-- Long Description File
  2.  
  3.            ADS Zone: 1
  4.      ADS Hatch Site: Don Plesky
  5.        ADS Position: ADS Zone 1 Coordinator
  6.            BBS Name: EastPointe Amiga BBS
  7.     Phone Number(s): 810-773-6959
  8.     Network Address: 1:120/229  
  9.      Network Region: 11    
  10.           BBS Hours: 24 Hrs/Day
  11. BBS Mailer/Software: DLG Trapdoor/PDQmail
  12.   BBS Storage Space: 2 Gig 
  13.   File Requestable :  <X> Y     < > N
  14. File Request Hours : All The Time
  15.  
  16. ==========================================
  17.             Long Description
  18. ==========================================
  19.  
  20. Short:  Generates WARN (5) codes on qualifiers
  21. Author: Frederic Delacroix
  22. Type:   util/boot
  23. Source: Fish collection
  24.  
  25. The  reason  for  this  program  to be is that I recently had trouble in finding
  26. which  of  the  programs  launched in my user-startup was sometimes crashing the
  27. system.  I wrote a special version of the user-startup that asked before running
  28. all programs, and thought it would be great to have a program allowing to switch
  29. the files automatically when a key was hit.
  30.  
  31. The  best candidates for those keys were of course the qualifiers, since they do
  32. not  interfere  with the output window.  Moreover, there is a new (V36) function
  33. in  the input.device that would make it easy to test:  PeekQualifier().  So here
  34. is this program, which does not even require a window to be opened to work.  The
  35. program fits in one disk block, and is pure, meaning it can be made resident.
  36.  
  37. To use PeekQual, you must have kickstart 2.04 or higher.  It will only work from
  38. CLI, the template is as follows:
  39.  
  40. PeekQual ONQUAL,OFFQUAL
  41.  
  42.     Each  of the arguments, ONQUAL and OFFQUAL, should be a word made of the
  43. following  letters  (I've tried to respect this rule:  lower case for left keys,
  44. and upper case for right ones):
  45.  
  46.     s:    left Shift
  47.     S:    right Shift
  48.     c:    Control
  49.     C:    Caps lock
  50.     a:    left Alt
  51.     A:    right Alt
  52.     g:    left amiGa
  53.     G:    right amiGa
  54.     b:    left mouse Button
  55.     B:    right mouse Button
  56.     m:    Middle mouse button
  57.  
  58.     The  program does the following:  it PeekQualifier()s and then tests the
  59. result:  if all keys given in the ONQUAL argument are pressed and all keys given
  60. in  the  OFFQUAL argument are NOT be pressed, then the program returns WARN (5),
  61. else  it returns OK (0).  The result can then be tested with the IF WARN command
  62. in  a  script  file.   All qualifiers given neither in ONQUAL nor in OFFQUAL are
  63. ignored.
  64.  
  65. Example, in your startup-sequence:
  66.  
  67. PeekQual CSs
  68. IF WARN
  69.  Execute S:User-Startup.Debug
  70. ELSE
  71.  Execute S:User-Startup
  72. ENDIF
  73.  
  74. Frederic Delacroix
  75. 5 rue d'Artres
  76. 59269 Querenaing
  77. FRANCE
  78.